package com.cy.dao;

import com.cy.entity.Dept;
import com.cy.entity.Emp;
import com.cy.entity.Tj;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface DeptDao {
    List<Emp> list(Tj tj);
    @Select("select * from dept")
    List<Dept> dept();
    @Delete("delete from emp where id=#{id}")
    void del(Integer id);
    @Insert("insert into emp values(null,#{date},#{eid},#{ename},#{sex},#{deptid},#{total},#{attachment})")
    void insert(Emp emp);
    @Select("select * from emp where id=#{id}")
    Emp sel(Integer id);
    @Update("update emp set date = #{date},eid=#{eid},ename=#{ename},sex=#{sex},deptid=#{deptid},total=#{total},attachment=#{attachment} where id=#{id}")
    void update(Emp emp);
}
